package com.muchfish.reactor.api;

import reactor.core.publisher.Flux;

public class ReactorConcatMapExample {
    public static void main(String[] args) {
        Flux<Integer> source = Flux.range(1, 3);

        // 对每个元素进行异步操作，保持相对顺序
        source.concatMap(value -> Flux.just(value * 2).log())
                .subscribe(System.out::println);
    }
}
